import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
//#region 柴宗泽
//#endregion


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView,
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   component: () => import('../views/AboutView.vue'),
    // },
    {
      path: '/CeShu',
      name: 'CeShu',
      component: () => import('../views/module components/CeShu.vue'),
    },
    {
      path: '/',
      name: 'NewLoginView',
      component: () => import('../views/NewLoginView.vue'),
    },
    {
      path: '/LoginView',
      name: 'LoginView',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/LoginView',
      name: 'LoginView',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/production',
      name: 'production',
      component: () => import('../views/shengchan/production.vue'),
    },
    {
      path: '/AddYushengchan',
      name: 'AddYushengchan',
      component: () => import('../views/shengchan/1/AddYushengchan.vue'),
    },
    {
      path: '/Getyushengchan',
      name: 'Getyushengchan',
      component: () => import('../views/shengchan/1/Getyushengchan.vue'),
    },
    {
      path: '/Getyushengchan',
      name: 'Getyushengchan',
      component: () => import('../views/shengchan/1/PreProductionPlanList.vue'),
    },
    ///菜单
    {
      path: '/MianView',
      name: 'MianView',
      children: [
        //#region 授权中心
        ///用户信息//////////////////////////
        {
          path: '/UserCreateView',
          name: 'UserCreateView',
          component: () => import('../views/User/UserCreateView.vue'),
        },
        {
          path: '/UserList',
          name: 'UserList',
          component: () => import('../views/User/UserList.vue'),
        },
        {
          path: '/DquView',
          name: 'DquView',
          component: () => import('../views/User/DquView.vue'),
        },
        {
          path: '/UpdateUserView',
          name: 'UpdateUserView',
          component: () => import('../views/User/UpdateUserView.vue'),
        },
        ///////角色
        {
          path: '/AddRole',
          name: 'AddRole',
          component: () => import('../views/Role/AddRole.vue'),
        },
        {
          path: '/RoleList',
          name: 'RoleList',
          component: () => import('../views/Role/RoleList.vue'),
        },
        /////菜单
        {
          path: '/MenulistView',
          name: 'MenulistView',
          component: () => import('../views/Menu/MenulistView.vue'),
        },
        {
          path: '/UpdateMental',
          name: 'UpdateMental',
          component: () => import('../views/Menu/UpdateMental.vue'),
        },
        {
          path: '/AddMenuView',
          name: 'AddMenuView',
          component: () => import('../views/Menu/AddMenuView.vue'),
        },
        //角色分配菜单
        {
          path: '/AddRoleMenu',
          name: 'AddRoleMenu',
          component: () => import('../views/RoleMenu/AddRoleMenu.vue'),
        },
        //#endregion
        //#region  请假审批
        //请假审批///////////////////////////
        //添加请假申请表
        {
          path: '/AddLeaveModel',
          name: 'AddLeaveModel',
          component: () => import('../views/ApproveLevel/AddLeaveModel.vue'),
        },
        {
          path: '/ListLeaveModel',
          name: 'ListLeaveModel',
          component: () => import('../views/ApproveLevel/ListLeaveModel.vue'),
        },
        {
          path: '/UpdateLeaveModel',
          name: 'UpdateLeaveModel',
          component: () => import('../views/ApproveLevel/UpdateLeaveModel.vue'),
        },
        {
          path: '/AppLeaveModel',
          name: 'AppLeaveModel',
          component: () => import('../views/ApproveLevel/AppLeaveModel.vue'),
        },//显示详情
        {
          path: '/InLeaveModel',
          name: 'InLeaveModel',
          component: () => import('../views/ApproveLevel/InLeaveModel.vue'),
        },
        //#endregion
        //#region 溯源管理
        /////////////////////溯源管理/////////////////////////
        { //溯源列表
          path: '/ListTraceability',
          name: 'ListTraceability',
          component: () => import('../views/Traceability/ListTraceability.vue'),
        },

        { //溯源详情
          path: '/InTraceability',
          name: 'InTraceability',
          component: () => import('../views/Traceability/InTraceability.vue'),
          children: [
            { //养殖信息
              path: '/InSU_Breed',
              name: 'InSU_Breed',
              component: () => import('../views/Traceability/InSU_Breed.vue'),
            },
            { //深度信息
              path: '/InSU_Deep',
              name: 'InSU_Deep',
              component: () => import('../views/Traceability/InSU_Deep.vue'),
            },
            { //屠宰信息表
              path: '/InSU_Slaughter',
              name: 'InSU_Slaughter',
              component: () => import('../views/Traceability/InSU_Slaughter.vue'),
            },
          ]
        },

        //#endregion

        //#region ERP管理系统

        //#region 初始数据 -- 供应商 --物料清单 --人员
        {
          path: '/AddGYS',
          name: 'AddGYS',
          component: () => import('../views/L_GYS/AddGYS.vue'),
        },
        //#endregion

        //#endregion

        //#region 柴宗泽-仓库管理


        //#endregion
      ],
      component: () => import('../views/MianView.vue'),
    },


    {
      path: '/warehouse/inbound-confirmation',
      name: 'InboundConfirmation',
      component: () => import('../views/Storage/warehouse/InboundConfirmation.vue'),
      meta: {
        title: '入库确认列表页'
      }
    },
    {
      path: '/warehouse/inbound-confirmation-new',
      name: 'InboundConfirmationNew',
      component: () => import('../views/Storage/warehouse/InboundConfirmationNew.vue'),
      meta: {
        title: '入库确认新增页'
      }
    },
    {
      path: '/warehouse/inbound-detail',
      name: 'InboundDetail',
      component: () => import('../views/Storage/warehouse/InboundDetail.vue'),
      meta: {
        title: '入库确认详情页'
      }
    },
    {
      path: '/warehouse/outbound-confirmation',
      name: 'OutboundConfirmation',
      component: () => import('../views/Storage/outbound/OutboundConfirmation.vue'),
      meta: {
        title: '出库确认列表'
      }
    },
    {
      path: '/warehouse/outbound-detail',
      name: 'OutboundDetail',
      component: () => import('../views/Storage/outbound/OutboundDetail.vue'),
      meta: {
        title: '出库确认详情页'
      }
    },
    {
      path: '/warehouse/outbound-confirmation-new',
      name: 'Outboundconfirmationnew',
      component: () => import('../views/Storage/outbound/OutboundConfirmationNew.vue'),
      meta: {
        title: '出库确认新增页'
      }
    },
  ],
})

export default router
